package com.ruoyi.coupon.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 分销优惠对象 wdmd_distribution_coupon
 * 
 * @author ruoyi
 * @date 2025-11-04
 */
public class DistributionCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠ID */
    private Long couponId;

    /** 分销员ID */
    @Excel(name = "分销员ID")
    private Long distributorId;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String couponName;

    /** 优惠类型：1=优惠券 2=专属折扣 3=拼团返现 */
    @Excel(name = "优惠类型：1=优惠券 2=专属折扣 3=拼团返现")
    private String couponType;

    /** 优惠率（折扣率） */
    @Excel(name = "优惠率", readConverterExp = "折=扣率")
    private BigDecimal faceValue;

    /** 使用门槛 */
    @Excel(name = "使用门槛")
    private BigDecimal minAmount;

    /** 适用商品范围（NULL表示全商品） */
    @Excel(name = "适用商品范围", readConverterExp = "N=ULL表示全商品")
    private String applicableProducts;

    /** 适用订单类型：1=自助餐 2=节日礼盒 3=住宿 */
    @Excel(name = "适用订单类型：1=自助餐 2=节日礼盒 3=住宿")
    private String applicableOrderTypes;

    /** 生效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 使用次数限制（0=不限） */
    @Excel(name = "使用次数限制", readConverterExp = "0==不限")
    private Long useLimit;

    /** 领取次数 */
    @Excel(name = "领取次数")
    private Long getCount;

    /** 使用次数 */
    @Excel(name = "使用次数")
    private Long useCount;

    /** 状态（0=上架 1=下架） */
    @Excel(name = "状态", readConverterExp = "0==上架,1==下架")
    private String status;

    /** 删除（0存在 2删除） */
    private String delFlag;

    /** 版本号（乐观锁） */
    @Excel(name = "版本号", readConverterExp = "乐=观锁")
    private Long version;

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }

    public void setDistributorId(Long distributorId) 
    {
        this.distributorId = distributorId;
    }

    public Long getDistributorId() 
    {
        return distributorId;
    }

    public void setCouponName(String couponName) 
    {
        this.couponName = couponName;
    }

    public String getCouponName() 
    {
        return couponName;
    }

    public void setCouponType(String couponType) 
    {
        this.couponType = couponType;
    }

    public String getCouponType() 
    {
        return couponType;
    }

    public void setFaceValue(BigDecimal faceValue) 
    {
        this.faceValue = faceValue;
    }

    public BigDecimal getFaceValue() 
    {
        return faceValue;
    }

    public void setMinAmount(BigDecimal minAmount) 
    {
        this.minAmount = minAmount;
    }

    public BigDecimal getMinAmount() 
    {
        return minAmount;
    }

    public void setApplicableProducts(String applicableProducts) 
    {
        this.applicableProducts = applicableProducts;
    }

    public String getApplicableProducts() 
    {
        return applicableProducts;
    }

    public void setApplicableOrderTypes(String applicableOrderTypes) 
    {
        this.applicableOrderTypes = applicableOrderTypes;
    }

    public String getApplicableOrderTypes() 
    {
        return applicableOrderTypes;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setUseLimit(Long useLimit) 
    {
        this.useLimit = useLimit;
    }

    public Long getUseLimit() 
    {
        return useLimit;
    }

    public void setGetCount(Long getCount) 
    {
        this.getCount = getCount;
    }

    public Long getGetCount() 
    {
        return getCount;
    }

    public void setUseCount(Long useCount) 
    {
        this.useCount = useCount;
    }

    public Long getUseCount() 
    {
        return useCount;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("distributorId", getDistributorId())
            .append("couponName", getCouponName())
            .append("couponType", getCouponType())
            .append("faceValue", getFaceValue())
            .append("minAmount", getMinAmount())
            .append("applicableProducts", getApplicableProducts())
            .append("applicableOrderTypes", getApplicableOrderTypes())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("useLimit", getUseLimit())
            .append("getCount", getGetCount())
            .append("useCount", getUseCount())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
